<template>
  <div>
    <a-button type="primary" @click="showModal">
      申请修改信息
    </a-button>
    <a-modal
      title="申请修改信息"
      :visible="visible"
      :confirm-loading="confirmLoading"
      @ok="handleok"
      @cancel="handlecancel"
    >
        <a-textarea v-model="ModalText" rows="4" placeholder="请输入申请理由"/>
    </a-modal>
  </div>
</template>

<script>
  import {postAction} from '@/api/manage'
  export default {
    name:"QRcode",
    data() {
      return {
        ModalText: '',
        visible: false,
        confirmLoading: false,
        url:"/org/diyProfessorInfo/modeify",
      };
    },
    methods: {
      showModal() {
          this.visible = true;
      },
      handleok(e) {
        console.log("开始发送")
        //向后端发送axios请求
        let params={
          ModalText:this.ModalText
        };
        postAction(this.url,params).then((res)=>{
          console.log("123456789");
          console.log(res)
          if (res.success == true){
            this.$message.success("发送成功！")
          }else {
            this.$message.error("发送失败！")
          }
        })
        this.visible = false;
      },
    handlecancel(e) {
        this.visible = false;
      },
  }
  };
</script>

<style scoped>

</style>